from django.db import models

# Create your models here.

class User(models.Model):
    user = models.CharField(verbose_name="用户名", max_length=30)
    pwd = models.CharField(verbose_name="密码", max_length=30)
    phone = models.CharField(verbose_name="手机号", max_length=11)
    def __str__(self):
        return self.user
    class Meta:
        db_table = 'user_tb'
        verbose_name = '用户表'
        verbose_name_plural = verbose_name

class Student(models.Model):
    AGE = (
        (1, '男'),
        (2, '女')
    )
    name = models.CharField(verbose_name="姓名", max_length=30)
    gender = models.IntegerField(verbose_name='性别', choices=AGE)
    age = models.IntegerField(verbose_name="年龄")
    hao = models.CharField(verbose_name="爱好", max_length=30)
    def __str__(self):
        return self.name
    class Meta:
        db_table = 'student_tb'
        verbose_name = '学生表'
        verbose_name_plural = verbose_name

